<?php // no direct access 

defined('_JEXEC') or die('Restricted access'); 



?>

<form action="index.php" method="post" name="adminForm">
<table class="list">
<thead>
<tr>

<th><strong>Intestazione</strong></th><td></td>
<th><strong>Indirizzo</strong></td>
<th><strong>Localita</strong></td>
<th><strong>Provincia</strong></td>
<th><strong>Email</strong></td>
<th><strong>Pubblicazione</strong></td>
</tr>
</thead>
<?php 

foreach($this->lista as $l): 
      $checked = JHTML::_('grid.id', $i, $l->id );
      $published = JHTML::_('grid.published', $l, $i );
?>
<tr>
<td><?php echo $checked; ?></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $l->Intestazione; ?></a></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $l->Indirizzo; ?></a></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $l->Localita; ?></a></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $l->Provincia; ?></a></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $l->Email; ?></a></td>
<td><a href="<?php echo $l->link; ?>"><?php echo $published ?></a></td>
</tr>
<?php endforeach; ?>
</table>
  <input type="hidden" name="option" 
                    value="<?php echo $option;?>" />
  <input type="hidden" name="task" value="" />
  <input type="hidden" name="boxchecked" value="0" />
  </form>
<?php
/*
$n = count($this->lista);
//echo $n;

for ($i=0;  $i<$n; $i++)
{
	$row =$this->lista[$i];
	$checked = JHTML::_('grid.id', $i, $row->id );
//	$published = JHTML::_('grid.published', $row, $i);
	$published = JHTMLGrid::published($row, $i);
	
	echo $checked. " - " . $row->Intestazione. " - " . $row->Indirizzo. " - " . $row->Localita. " - " . $row->Cap;
	echo " - " . $row->Provincia. " - " . $row->Telefono. " - " . $row->Cellulare. " - " . $row->Email ." - " . $published;
	
	echo "<br>";
	
}
	/*
$fo = '<form name="%s" method="post" action="index.php">';
$la = '<label for="%s">%s</label>';
$in = '<input type="%s" name="%s" id="%s" size="%s" />';
$ta = '<textarea name="%s" id="%s" rows="%s" cols="%s"></textarea>';
$su = '<input type="%s" name="%s" value="%s" />';

$html = sprintf($fo, $this->form['name']);

foreach($this->form['fields'] as $field) {
	
	if(!isset($field['type'])) 
		$field['type'] = 'text';
	$type = strtolower($field['type']);
	
	if($field['type'] == 'text') {
		if(!isset($field['size'])) 
			$field['size'] = 25;
	}
	if($field['type'] == 'textarea') {
		if(!isset($field['cols'])) 
			$field['cols'] = 25;
		if(!isset($field['rows'])) 
			$field['rows'] = 15;
	}
	
	if(isset($field['label']))
		$html .= sprintf($la, $field['id'], $field['label']) . '<br />';
	
	switch($type) {
		case 'text':
			$html .= sprintf($in, $type, $field['name'], $field['id'], $field['size']) . '<br />';
			break;
		
		case 'textarea':
			$html .= sprintf($ta, $field['name'], $field['id'], $field['rows'], $field['cols']) . '<br />';
			break;
			
		case 'submit':
			$html .= sprintf($su, $type, $field['name'], $field['name']);
			break;
			
		case 'hidden':
			$html .= sprintf($su, $type, $field['name'], $field['value']);
			break;
	}
}	
$html .= '</form>';
echo $html;
*/
?>